<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div>
The second word and the space before the second word should be deleted. It should like this this:
<br>
foo bar
</div>
<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
<div id="sample" contenteditable>foo bar baz</div>
</div>
<div id="log"></div>
<script>
test(function() {
    if (window.internals)
        internals.settings.setEditingBehavior('win');
    var selection = window.getSelection();
    var sample = document.getElementById('sample');
    selection.collapse(sample.firstChild, 4);
    var rect = selection.getRangeAt(0).getClientRects()[0];
    if (!window.eventSender)
        return;
    eventSender.mouseMoveTo(rect.left, rect.top);
    eventSender.mouseDown();
    eventSender.mouseUp();
    eventSender.mouseDown();
    eventSender.mouseUp();
    document.execCommand('delete');
    assert_equals(sample.textContent, 'foo baz');
});
</script>
